/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2023-07-15
 * Time:11:22
 */
/*
BM91反转字符串
 */

public class solve {
    public static void main(String[] args) {
        System.out.println(solve("abcd"));
    }
    public static StringBuilder solve (String str) {
        // write code here
        StringBuilder stringBuilder = new StringBuilder();
        for (char c:str.toCharArray()) {
            stringBuilder.append(c);
        }
        return stringBuilder.reverse();
    }
}
